{extend name="admin/public:layout" /}
{block name="title"}圈子管理{/block}
{block name="head"}{/block}
{block name="body"}
<div class="wrapper wrapper-content">
    <div class="ibox">
        <div class="ibox-title">
            <ol class="breadcrumb">
                <li><i class="fa fa-hand-o-right"></i> <a href="{:url('index')}"> 圈子管理</a></li>
                <li class="active">添加圈子</li>
            </ol>
        </div>
        <div class="ibox-content">
            <form method="post" class="form-horizontal" id="form">
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">圈子名称</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder="请输入圈子名称"
                               name="circle_name" value="" datatype="*" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">圈子分类</label>
                    <div class="col-sm-4">
                        <select class="form-control" name="circle_class_id">
                            <option>请选择圈子分类</option>
                            {volist name="circleClass" id="vo"}
                            <option value="{$vo.class_id}">{$vo.class_name}</option>
                            {/volist}
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">是否推荐</label>
                    <div class="col-sm-4">
                        <label class="radio-inline i-checks">
                            <input type="radio" name="is_recommend" value="0" checked /> 否
                        </label>
                        <label class="radio-inline i-checks">
                            <input type="radio" name="is_recommend" value="1" /> 是
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">圈子描述</label>
                    <div class="col-sm-8">
                        <textarea name="circle_desc" class="form-control"></textarea>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">圈子TAG</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder="请输入圈子TAG"
                               name="circle_tag" value="" datatype="*" />
                        <p class="help-block">每个tag按,隔开</p>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">圈子图片</label>
                    <div class="col-sm-4">
                        <p class="form-control-static">
                            {:widget('common/Form/singleImg',['circle_img','',-2])}
                        </p>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">圈子公告</label>
                    <div class="col-sm-8">
                        <textarea name="circle_notice" class="form-control"></textarea>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">圈子状态</label>
                    <div class="col-sm-4">
                        <label class="radio-inline i-checks">
                            <input type="radio" name="circle_status" value="0" /> 关闭
                        </label>
                        <label class="radio-inline i-checks">
                            <input type="radio" name="circle_status" value="1" checked /> 开启
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">是否审核</label>
                    <div class="col-sm-4">
                        <label class="radio-inline i-checks">
                            <input type="radio" name="circle_joinaudit" value="0" /> 否
                        </label>
                        <label class="radio-inline i-checks">
                            <input type="radio" name="circle_joinaudit" value="1" checked /> 是
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">圈子管理员</label>
                    <div class="col-sm-8">
                        {eq name="adminInfo.admin_power" value="3"}
                        <input type="text" class="form-control" placeholder="请输入圈子管理员账号"
                               name="circle_mastername" value="{$adminInfo.admin_name}" datatype="*" readonly />
                        {else}
                        <input type="text" class="form-control" placeholder="请输入圈子管理员账号"
                               name="circle_mastername" value="" datatype="*" />
                        {/eq}
                        <p class="help-block">可以管理该圈子前端动态，审批会员申请圈子请求</p>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-10 col-sm-offset-2">
                        <button class="btn btn-primary" type="button" id="btnSub">保存内容</button>
                        <a href="{:url('index')}" class="btn btn-white">取消</a>
                        <span id="validError"></span>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
{/block}
{block name="script"}
<script type="text/javascript">
    $(function () {
        iCheck();
        ajaxSubForm('#btnSub');
    })
</script>
{/block}